package com.lyj.mode.adapter.objectadapter;

/**
 * 手机类
 * @author:liyajie
 * @createTime:2022/2/17 21:48
 * @version:1.0
 */
public class Phone {
    public void charge(Dc dc){
        if(dc.outputDc() == 5){
            System.out.println("电压正常，可以安全充电");
        }else {
            System.out.println("电压异常，危险！");
        }
    }
}
